var dayjs = require('dayjs')
const utils = {
  toast(title = '没有传就提示我', icon = 'success') {
    wx.showToast({
      title,
      icon,
      duration: 2000,
      mask: true
    });
  },
  formatTime(date, type = 'YYYY-MM-DD') {
    return dayjs(date).format(type)
  }
}

wx.utils = utils

